package com.zc.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zc.dao.ComployeeMapper;
import com.zc.dao.DepartmentMapper;
import com.zc.dao.UserInfoMapper;
import com.zc.dao.ZcInfoMapper;
import com.zc.dao.ZcInoutMapper;
import com.zc.service.StatisticsService;
import com.zc.vo.CountVo;

@Service
public class StatisticsServiceImpl implements StatisticsService {
	@Autowired
	UserInfoMapper userInfoMapper;
	@Autowired
	DepartmentMapper departmentMapper;
	@Autowired
	ComployeeMapper comployeeMapper;
	@Autowired
	ZcInfoMapper zcInfoMapper;
	@Autowired
	ZcInoutMapper zcInoutMapper;

	@Override
	public CountVo selectCount() {
//		'用户数量', '部门数量', '员工数量', '资产总量', '资产借出', '资产报废', '资产维修','资产归还'
		CountVo vo = new CountVo();
		Long num1 = userInfoMapper.selectCount();
		Long num2 = departmentMapper.selectCount();
		Long num3 = comployeeMapper.selectCount();
		// 查资产总量
		Long num4 = zcInfoMapper.selectCount();
		// 查资产借出数量
		Long num5 = zcInfoMapper.selectCountJc();
		// 资产报废
		Long num6 = zcInfoMapper.selectCountBf();
		// 资产维修
		Long num7 = zcInfoMapper.selectCountWx();
		// 资产归还
		Long num8 = zcInfoMapper.selectCountZc();
		vo.setNum1(num1);
		vo.setNum2(num2);
		vo.setNum3(num3);
		vo.setNum4(num4);
		vo.setNum5(num5);
		vo.setNum6(num6);
		vo.setNum7(num7);
		vo.setNum8(num8);
		return vo;
	}

}
